-- GENERATED SPELL FOR [Cabal Ritualist] --


function spell0_18794(pUnit, Event) --@Addle Humanoid,n/a--
pUnit:FullCastSpellOnTarget(33487,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 7500, 1)
end

function spell1_18794(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(33833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 605, 1)
end

function spell2_18794(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(38264,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 535, 1)
end

function spell3_18794(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(17201,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 623, 1)
end

function spell4_18794(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(14145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 560, 1)
end

function spell5_18794(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(20795,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 619, 1)
end

function spell6_18794(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(9574,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 47200, 1)
end

function spell7_18794(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15063,pUnit)
pUnit:RegisterEvent('Sorts_18794', 8331, 1)
end

function spell8_18794(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_18794', 8321, 1)
end

function spell9_18794(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(12675,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 7000, 1)
end

function spell10_18794(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15497,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 7000, 1)
end

function spell11_18794(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(12540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18794', 4328, 1)
end

function Sorts_18794(pUnit, Event)
local choix_sorts_18794 = math.random(0, 11)
if choix_sorts_18794 == 0 then
pUnit:RegisterEvent('spell0_18794', 1, 1)
end
if choix_sorts_18794 == 1 then
pUnit:RegisterEvent('spell1_18794', 1, 1)
end
if choix_sorts_18794 == 2 then
pUnit:RegisterEvent('spell2_18794', 1, 1)
end
if choix_sorts_18794 == 3 then
pUnit:RegisterEvent('spell3_18794', 1, 1)
end
if choix_sorts_18794 == 4 then
pUnit:RegisterEvent('spell4_18794', 1, 1)
end
if choix_sorts_18794 == 5 then
pUnit:RegisterEvent('spell5_18794', 1, 1)
end
if choix_sorts_18794 == 6 then
pUnit:RegisterEvent('spell6_18794', 1, 1)
end
if choix_sorts_18794 == 7 then
pUnit:RegisterEvent('spell7_18794', 1, 1)
end
if choix_sorts_18794 == 8 then
pUnit:RegisterEvent('spell8_18794', 1, 1)
end
if choix_sorts_18794 == 9 then
pUnit:RegisterEvent('spell9_18794', 1, 1)
end
if choix_sorts_18794 == 10 then
pUnit:RegisterEvent('spell10_18794', 1, 1)
end
if choix_sorts_18794 == 11 then
pUnit:RegisterEvent('spell11_18794', 1, 1)
end
end

function mob18794_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18794', math.random(1500, 3000), 1)
end

function mob18794_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18794_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18794_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18794, 1, 'mob18794_Action')
RegisterUnitEvent(18794, 2, 'mob18794_Leave')
RegisterUnitEvent(18794, 3, 'mob18794_Kill')
RegisterUnitEvent(18794, 4, 'mob18794_Die')
